<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/template-web.js"></script>
</head>
<body>
    <ul id="ul1">
        <script type="text/html" id="tml1">
            <li>{{username}}</li>
        </script>
    </ul>


    <script>
        const tmpcontent =  template("tml1",{"username":"哈哈"})
        console.log(tmpcontent)
        document.querySelector("#ul1").innerHTML = tmpcontent;
    </script>
</body>
</html>